At present, to save storage space, servers generally all support compression of stored data.
In the prior art, a server uses a preset compression algorithm to compress data in a data block, for example, the server uses a dictionary compression algorithm. In this case, the server scans data in a data block byte by byte to determine a character string that occurs consecutively and repeatedly in the data block, and compresses the character string that occurs consecutively and repeatedly.
It can be learned from the foregoing that the server can use only one compression algorithm to compress only data with a particular characteristic in the data block. Therefore, a compression ratio at which the data in the data block is compressed is relatively low in the prior art.